From: Keir Fraser Date: Tue, 28 Jul 2009 15:47:37 +0000 (+0100) Subject: ns16550: More robust check for presence of FIFO X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13544 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=060cc4dbc77621d4f247bff1b4509a4f54a6feda;p=xen.git ns16550: More robust check for presence of FIFO Signed-off-by: Christoph Egger --- diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 1f88907008..7de7fcd386 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -214,7 +214,8 @@ static void __devinit ns16550_init_preirq(struct serial_port *port) ns_write_reg(uart, FCR, FCR_ENABLE | FCR_CLRX | FCR_CLTX | FCR_TRG14); /* Check this really is a 16550+. Otherwise we have no FIFOs. */ - if ( (ns_read_reg(uart, IIR) & 0xc0) == 0xc0 ) + if ( ((ns_read_reg(uart, IIR) & 0xc0) == 0xc0) && + ((ns_read_reg(uart, FCR) & FCR_TRG14) == FCR_TRG14) ) port->tx_fifo_size = 16; }